<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
 <%
 out.print("<script>var startDate='"+request.getParameter("startDate")+"';var endDate='"+request.getParameter("endDate")+"' ;</script>");
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>资源甘特图</title>
<%@ include file="/WEB-INF/include/include.jsp"%>
<script type="text/javascript"
	src="<%=path%>/js/rms/resgantt/FusionCharts.js"></script>
<script type="text/javascript">
var isJSChartNotAvailable = true;
</script>
<script type="text/javascript"
	src="<%=path%>/js/rms/resgantt/ResGantt.js"></script>
<script type="text/javascript"
	src="<%=path%>/js/rms/resgantt/jquery.min.js"></script>
</head>
<body>
	<div id="searchWrap"></div>
	<div class="listpage-grid" id="chartdiv"></div>
	<script type="text/javascript">
		if ((typeof isJSChartNotAvailable == "undefined" || !isJSChartNotAvailable == true)
				&& (GALLERY_RENDERER && GALLERY_RENDERER
						.search(/javascript|flash/i) == 0))
			FusionCharts.setCurrentRenderer(GALLERY_RENDERER);
		var chart = new FusionCharts("<%=path%>/js/rms/resgantt/Gantt.swf",
				"ChartId", "800", "380", "0", "1");
	</script>
	<div class="qua-button-holder"></div>
	<div class="show-code-block"></div>

</body>
<ui:page>
<ui:formPanel renderTo="searchWrap" height="30">
		<x:items>
			<x:value>
				<x:attr name="padding" type="string">2</x:attr>
				<x:attr name="layout">column</x:attr>
				<x:attr name="border" type="int">0</x:attr>
				<x:attr name="items" type="array">
					<ui:formPanel.date fieldLabel="开始日期" id="startDate"></ui:formPanel.date>
					<ui:formPanel.date fieldLabel="结束日期" id="endDate"></ui:formPanel.date>
					<ui:button handler="drawGantt" text="查询" iconCls="icon-search"></ui:button>
				</x:attr>
			</x:value>
		</x:items>
	</ui:formPanel>
	<x:bottomScript>
	Ext.getCmp("startDate").setValue(startDate);
	Ext.getCmp("endDate").setValue(endDate);
	if(startDate!=undefined&&startDate!="null"){
	drawGantt();
	}
	</x:bottomScript>
</ui:page>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						if (chart.options.renderer == "javascript") {
							$(".description-text").css({
								"visibility" : "hidden"
							});
							$(".qua-button-holder").css({
								"visibility" : "hidden"
							});
							$(".show-code-block").css({
								"visibility" : "hidden"
							});
							$(".chart-title")
									.next()
									.addClass("highlightBlock")
									.css({
										"text-align" : "center"
									})
									.html(
											"JavaScript version of Gantt Chart is not supported.");
						} else {
							$(".chart-title").next().removeClass(
									"highlightBlock").html("&nbsp;");
						}
					});
	
	
</script>
</html>


